home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / CRS / crs19.d81 / simman.arc / MANDEL1.TXT < prev    next >
Text File  |  2009-10-10  |  14KB  |  331 lines

  1. BB
  2. B    INTRODUCTION   Mandelbrot set system
  3. B                   by John M. Albergo
  4. B
  5. B         The Mandelbrot Set is a mathematical construct of infinite
  6. B    complexity.  Its fascinating images can be viewed by the use of a
  7. B    computer with graphics capabilities.  The programs in this kit function
  8. B    together to make the C64 a useful tool in the exploration of this
  9. B    infinite mathematical territory.  If you are unfamiliar with the
  10. B    concept of the Mandelbrot Set, it may be helpful to do some reading on
  11. B    the subject.  The book, CHAOS: MAKING A NEW SCIENCE, by James Gleick is
  12. B    widely available, straightforward and a good place to start.
  13. B         The Mandelbrot Set is a collection of numbers, or points on a
  14. B    plane, that share a common property.  A mathematical operation is
  15. B    performed on each point, repeatedly.  After a certain number of
  16. B    repetitions have occured, and the number has not run off towards
  17. B    infinity, it is considered a part of the set.  In actuality a point is
  18. B    truly a member of the set if it can undergo an INFINITE number of
  19. B    repetitions without growing infinitely large.  Since computing time is
  20. B    limited, we must make our decisions a bit prematurely.  The points
  21. B    outside the set run off toward infinity at different rates.  The varied
  22. B    properties of these numbers contribute to the visual topography of the
  23. B    images.
  24. B
  25. B
  26. B    COMPUTING TIME
  27. B
  28. B         The length of time required to generate images of the set depends
  29. B    on several factors.  Some images will compute in an hour or two.  Some
  30. B    can take several DAYS.  It depends upon how deeply you are magnifying
  31. B    the set, which part of the set you are looking at and how much
  32. B    resolution you want.  The programs are compiled and optimized for
  33. B    speed.  But the infinite nature of the set means that eventually even a
  34. B    supercomputer will be overtaxed.  The images obtainable with this kit
  35. B    compare favorably to some produced by much more powerful machines.
  36. B         The calculating program can be stopped and restarted to allow you
  37. B    access to your computer whenever you want.
  38. B
  39. B
  40. B    REQUIREMENTS
  41. B
  42. B         To use this kit you need:
  43. B
  44. B    C64 with 2 drives
  45. B    SIMON'S BASIC (a commercial software pkg.)
  46. B    Patience.
  47. B
  48. B
  49. B    THE KIT
  50. B
  51. B         The kit consists of the following:
  52. B
  53. B    (compiled programs)
  54. B
  55. B         MANDELCRUNCH - performs the number crunching that is at the heart
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67. B    of any mandelbrot set program.
  68. B
  69. B         MANDELPAINT - lets you develop and adjust the graphics images to
  70. B    your taste.
  71. B
  72. B         MAGNIBROT - allows you to "zoom" in on selected regions of the set
  73. B    by adjusting the magnification "window".
  74. B
  75. B
  76. B    (basic programs)
  77. B
  78. B         AUTO-SEQ - displays multiple images in sequence to help visualize
  79. B    the magnification process.
  80. B
  81. B         COLOURS - lets you adjust the colours in the images.  Also
  82. B    "rotates" the colours as a "special effect".
  83. B
  84. B
  85. B
  86. B    THE FILES
  87. B
  88. B         The disk in drive 9 holds the files pertaining to the raw data
  89. B    generated by MANDELCRUNCH.  Drive 8 should hold all
  90. B    your program files.  Drive 8 will also
  91. B    hold the "picture" files that are refined from the raw data.
  92. B
  93. B
  94. B    RAW DATA FILES
  95. B
  96. B         MANDELCRUNCH deals with 3 files, which are kept on drive 9.  The
  97. B    structure of these filenames is:
  98. B
  99. B    (root).(ext)
  100. B
  101. B         The root name is supplied by you.
  102. B    The extensions are program-generated and will be
  103. B
  104. B    dat - data file
  105. B    prm - parameter file
  106. B    dst - distribution file
  107. B
  108. B         The data file is large, since it consists of two bytes for each of
  109. B    the 32000 points in the mandelbrot grid.  Therefore, only 2 mandelbrot
  110. B    runs will fit on a data disk.  Each run also uses a parameter file to
  111. B    keep track of restarts.  When the program is complete, a distribution
  112. B    file is generated which is used by MANDELPAINT to fine-tune the
  113. B    graphics images.
  114. B
  115. B
  116. B    PICTURE FILES
  117. B
  118. B         The fine-tuned images generated by mandelpaint are saved as
  119. B    picture files of 32 blocks each.  The format for picture files is:
  120. B
  121. B    (root).(ext).(mandelbrot indicator)
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133. B
  134. B         The root name will match the root name on the MANDELCRUNCH files.
  135. B    The extension may be program generated or user generated.  More on that
  136. B    later.  The mandelbrot indicator is simply a y or an n to indicate of
  137. B    any of the points fall within the mandelbrot set.
  138. B         Magni-Brot also generates picture files.  For these files the
  139. B    format is free-form.
  140. B
  141. B
  142. B
  143. B
  144. B
  145. B    RUNNING THE SYSTEM
  146. B
  147. B
  148. B         Your kit comes with the program files, the document files, some
  149. B    sample picture files, and a sample parameter file.
  150. B         Put all the program files and the picture file on drive 8.  Put
  151. B    the parameter file on drive 9.  All of the program files use SIMON'S
  152. B    BASIC except for MANDELCRUNCH.
  153. B         Try running the COLOURS program.  Load SIMON'S BASIC into the
  154. B    system, then load and run COLOURS.  When prompted for a filename, enter
  155. B    the complete name of one of the picture files.  Try "onw3>onw4.y".
  156. B    Once the picture is displayed, vary the colors with the "1" "2" "3"
  157. B    keys.  Rotate the colors by pressing "r".  While the colors are
  158. B    rotating, press "+" or "-" keys to control the rotation speed.  To stop
  159. B    rotation, press "r" again.
  160. B
  161. B         Load and run AUTO-SEQ.  Each press of a key will load successively
  162. B    higher magnifications of a section of the set.  These are all picture
  163. B    files created by MANDELPAINT and MAGNIBROT.  The use of a fast-load
  164. B    cartridge may speed up the loading of images, as these are stored as
  165. B    program files.
  166. B
  167. B
  168. B    CREATING YOUR OWN IMAGES
  169. B
  170. B         As mentioned earlier, MANDELCRUNCH is the heart of the system.
  171. B    Each image depends upon the millions of calculations performed by
  172. B    MANDELCRUNCH.  MANDELCRUNCH generates the data for an area of the
  173. B    mandelbrot set that you specify.  The area may be large enough to
  174. B    contain the entire set, or microscopically small.
  175. B         MANDELCRUNCH needs to know the area to be viewed.  It needs to
  176. B    know the maximum number of "iterations", or how many times each point
  177. B    will be calculated before it is accepted as a part of the set.  It also
  178. B    needs to keep track of where it is in the run, so that it may be
  179. B    interrrupted and restarted.  The parameter file contains these three
  180. B    pieces of information.
  181. B         Parameter files are created 2 different ways.  The easiest way to
  182. B    create parameters is to use MAGNIBROT.  You may also create the
  183. B    parameters manually when you first run MANDELCRUNCH.
  184. B
  185. B         Load and run MANDELCRUNCH.  SIMON'S BASIC is not needed for this
  186. B    program.  It will ask you for the root name of the area to be
  187. B    calculated.  If you have used MAGNIBROT, the program will load the
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199. B    parameters from drive 9 and will begin crunching.
  200. B
  201. B         If no parameter file exists for the root name, you will be given
  202. B    the option of creating one.  To create the parameters, you must enter
  203. B    rl,rh,il,ih and the iteration limit.  The variables correspond to the
  204. B    low and high limits of the real and imaginary numbers in the area of
  205. B    the complex plane to be examined.  This will make sense to you if you
  206. B    have done some reading on the subject of the mandelbrot set.  Once you
  207. B    enter the information, the program will begin the run.  NOTE:  when
  208. B    entering the limits for the real and imaginary numbers,  make sure that
  209. B    the range of the imaginary numbers equals 80% of the range of the
  210. B    reals.  That is, make sure that  (ih-il) = .8(rh-rl).
  211. B    This is needed to compensate for the nature of C64 graphics.  If you
  212. B    use MAGNIBROT on a previous image, the proper ratio will be
  213. B    automatically generated.
  214. B
  215. B         See "hints and tips" for information on how to choose your
  216. B    parameters.
  217. B
  218. B         MANDELCRUNCH will run.  And run and run.  It may keep running for
  219. B    quite a while.  You might start to wonder if it is running at all.  The
  220. B    screen is blanked out while the program runs.  This is a trick to gain
  221. B    some speed.  Since the processor doesn't have to bother with the
  222. B    display, it has more time to crunch.  There are 2 ways to get an idea
  223. B    of how far along the program is.  First, the screen won't stay solid
  224. B    black.  It will change colours during the run.  The c64 graphics are
  225. B    160 collumns and 200 rows.  The screen will change color every ten
  226. B    collumns.  If you are familiar with the c64 color code progression, you
  227. B    will have a good idea where the program is at.  If you don't, don't
  228. B    worry.  The program is interruptible, and when you interrupt it, it
  229. B    will tell you exactly where it is at.
  230. B         To interrupt MANDELCRUNCH, hit the left arrow key at the top left
  231. B    of the keyboard.  This will halt the program, the screen will come to
  232. B    life, and you will see how far along the program is.  If you are
  233. B    computing an image with a high iteration limit, there may be a moment
  234. B    before the program interrupts, as the program finishes the computations
  235. B    for the particular point it is examining.
  236. B         While the program is paused, you have the option of saving it or
  237. B    resuming.  To save press "s" to resume press "r".  Once the parameters
  238. B    have been saved, you can turn off the computer.  To restart
  239. B    MANDELCRUNCH, simply run it and tell it which parameter file to use.
  240. B    It will load the parameters and fast-forward to where it left off.
  241. B         Eventually, MANDELCRUNCH will end. The disk will be busy near the
  242. B    end, as the distribution file is created.  You are now ready to run
  243. B    MANDELPAINT.
  244. B
  245. B
  246. B
  247. B    MANDELPAINT.
  248. B
  249. B         The graphics images produced by MANDELPAINT are the result of
  250. B    mating the MANDELCRUNCH data to the c64 graphics, and to your visual
  251. B    tastes.
  252. B         The points that withstand the maximum iterations are in the set,
  253. B    and are colored black.  Simple enough.  But what about the rest of the
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265. B    points?  This is where much of the beauty is.
  266. B         As the points get closer to the set, they are pulled to infinity
  267. B    more and more slowly.  The graphics images show the varied topography
  268. B    of these points.  Pinwheels, starfish, curlicues and other shapes
  269. B    become apparent.
  270. B         Unfortunately, the c64 gives us only 4 colors to work with.
  271. B    MANDELPAINT helps to make the most of them.
  272. B
  273. B         Load and run MANDELPAINT (you must be using SIMON'S BASIC).  The
  274. B    data disk must be in drive 9.  Supply the root name, and the program
  275. B    will read in the distribution file.  The distribution file allows you
  276. B    to see how the data points are distributed within the iteration range.
  277. B    You can examine the distribution either graphically, or as a printout.
  278. B    The distribution graph will show the frequency of each iteration level
  279. B    compared to the highest count.  For example, assume you specified a
  280. B    maximum iteration of 100 in your parameter file.  Look at the graph.
  281. B    The graph is marked at the bottom of the screen.  The big marks are
  282. B    100's , the little ones are 10's.  Assume the highest point of the
  283. B    graph is at 20.  This would mean that more points ran to infinity after
  284. B    20 iterations than any other value.  The rest of the graph is then
  285. B    scaled in proportion to the number of points at 20.  Some graphs will
  286. B    have a pronounced peak, with all other values dropping off rapidly.
  287. B    Others may have many points near the peak.  The graph can help you pick
  288. B    manual cutoff points for colorizing the picture.  The graph can also
  289. B    help you pick iteration levels for your next magnification.  If you
  290. B    used more than 300 iterations, each successive key press will display
  291. B    the graph for another 300 iterations.  After the full range has been
  292. B    displayed, you will be prompted by the menu.
  293. B
  294. B         After viewing the graph, you can exit back to the main program and
  295. B    choose your colorization method, either Auto or Manual.  Both methods
  296. B    generate cutoff points that define how the set will be displayed.  The
  297. B    cutoff points are like lines on a topographic map.  The faster the
  298. B    terrain changes, the closer together the lines are on a topographic
  299. B    map.  The same applies to the display.  The faster the iteration levels
  300. B    change, the narrower the color bands will be.  If the cutoff points are
  301. B    too close together, it will be difficult to see patterns.  the display
  302. B    may look like random dots.  If the cutoff points are too large,
  303. B    interesting details may be lost.
  304. B         The Auto method saves a lot of time going over distribution lists
  305. B    and charts, and allows you to vary the cutoff points easily.  The
  306. B    display consists of 32000 points, or pixels.  You tell the program the
  307. B    minimum number of pixels to be devoted to any rage of iteration values.
  308. B    For example, specifying a number of 4000 would ensure a maximum of 8
  309. B    color zones on the display.  A value of 500 would mean 64 color zones.
  310. B    The best value is a matter of taste. Experiment.
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.